/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.ColorDao;
import com.techshop.model.Color;
import com.techshop.service.ColorService;
import java.util.List;

/**
 *
 * @author Hai-PC
 */
public class ColorServiceImpl implements ColorService
{    
    private ColorDao colorDao;    

    @Override
    public Color getById(String colorID)
    {
        return this.getColorDao().getById(colorID);
    }

    @Override
    public boolean insert(Color color)
    {
        return this.getColorDao().insert(color);
    }

    @Override
    public boolean update(Color color)
    {
        return this.getColorDao().update(color);
    }

    @Override
    public boolean delete(Color color)
    {
        return this.getColorDao().delete(color);
    }

    /**
     * @return the colorDao
     */
    public ColorDao getColorDao()
    {
        return colorDao;
    }

    /**
     * @param colorDao the colorDao to set
     */
    public void setColorDao(ColorDao colorDao)
    {
        this.colorDao = colorDao;
    }

    @Override
    public List<Color> getAll()
    {
        return colorDao.getAll();
    }

    @Override
    public List<Color> getAllExceptPhoneId(int phoneId)
    {
        return colorDao.getAllExceptPhoneId(phoneId);
    }
}